﻿using System;
using System.Text;

using BizElements.Core;
using BizElements.Core.ProviderComponents;

namespace BizElements.Core.PostgreSql
{
    sealed class PostgreSqlTableRenderer : ITableRenderer
    {
        public void RenderTableName(IDbTable table, StringBuilder output)
        {
            // Special characters must be enclosed in quotes.
            output.Append("\"");
            output.Append(table.TableName);
            output.Append("\"");
        }

        public void RenderAlias(IDbTable table, StringBuilder output)
        {
            // Special characters must be enclosed in quotes.
            output.Append("\"");
            output.Append(table.Alias);
            output.Append("\"");
        }
    }
}